#!/bin/bash

declare -r curr_dir=$( cd `dirname $0` ; pwd )

yum -y remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-engine

yum install -y yum-utils

yum-config-manager \
    --add-repo \
    http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

yum-config-manager --enable docker-ce-nightly

yum-config-manager --enable docker-ce-test

yum -y install docker-ce docker-ce-cli containerd.io

yum -y install docker-ce-18.09.1 docker-ce-cli-18.09.1 containerd.io

mkdir -p /etc/docker

tee /etc/docker/daemon.json <<-'EOF'
{
  "registry-mirrors": ["https://z06ufufh.mirror.aliyuncs.com"]
}
EOF

systemctl daemon-reload

systemctl restart docker

systemctl start docker





